public class ConcreteCompany : Company{
    // 组合模式
    private List<Company> _companies = new List<Company>();
    public ConcreteCompany(string name) : base(name){}

    public override void Add(Company company){
        _companies.Add(company);
    }

    public override void Remove(Company company){
        _companies.Remove(company);
    }

    public override void Display(int depth){
        Console.WriteLine(new string('-', depth) + name);
        foreach(var company in _companies){
            // 每下一层多显示2个-
            company.Display(depth + 2);
        }
    }
    /// <summary>
    /// 履行职责
    /// </summary>
    public override void LineOfDuty(){
        // 该组件履行职责就是让所有子组件履行职责
        foreach(var company in _companies){
            company.LineOfDuty();
        }
    }
}